const crypto = require('crypto');
const moment = require('moment');

const md5 = (data) => crypto.createHash('md5').update(data).digest('hex');

const timestamp = () => moment().valueOf();

const getYM = () => moment().format('YYYY-MM');


module.exports = {
  md5,
  timestamp,
  getYM
};
